package com.xie.demo.demo;

import java.util.*;
import java.util.function.IntConsumer;
import java.util.stream.Collectors;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        Optional<String> a1 = Optional.ofNullable(a);
        foreachArr(System.out::println);
        foreachArr(i -> System.out.println(i));
        List<Integer> list = new ArrayList<>();
        Map<String, String> map = new HashMap<>();
        list.add(1);
        list.stream()
                .distinct()
                .filter(i -> i == 1)
                .forEach(i -> System.out.println(i));
        System.out.print(a1);
    }

    public static void foreachArr(IntConsumer consumer){
        int[] arr = {1,2,3,4,5,6,7,8,9,10};
        for (int i : arr) {
            consumer.accept(i);
        }
    }

}